package com.appkubes.mall.restful.application.user.hierarchy.service;

import com.appkubes.common.exception.BusinessException;
import com.appkubes.mall.core.entity.MallUser;
import com.appkubes.mall.core.service.BaseMallUserHierarchyService;
import com.appkubes.mall.restful.application.user.hierarchy.entity.dto.UserHierarchyDTO;
import com.appkubes.mall.restful.application.user.hierarchy.entity.vo.UserHierarchyGetVO;
import com.appkubes.mall.restful.application.user.user.entity.vo.UserRegisterVO;
import com.baomidou.mybatisplus.core.metadata.IPage;

public interface UserHierarchyService extends BaseMallUserHierarchyService {
    //用户注册时记录用户层级信息
    Boolean register(String userKey, UserRegisterVO registerVO) throws BusinessException;

    /**
     * 获取用户的推广下级用户信息
     *
     * @param hierarchyGetVO
     * @return
     */
    IPage<UserHierarchyDTO> getListByParentKey(UserHierarchyGetVO hierarchyGetVO);

    /**
     * 获取用户的二级推广用户信息
     *
     * @param hierarchyGetVO
     * @return
     */
    IPage<UserHierarchyDTO> getListByParentKey2(UserHierarchyGetVO hierarchyGetVO);


    MallUser getParenUser(String userKey);

}
